<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>

<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
	<title>查看帖</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
</head>

<body>
	<h1>查看帖</h1>
	<s:form action="mainTie_view.do" method="post">
		<table border="1">
			<tr>
				<td colspan="2">
					<a href="${pageContext.request.contextPath}/huitie_add.do?huiTie.mainTie.mid=<s:property value="mainTie.mid"/>">回帖</a>
				</td>
			</tr>
			<tr>
				<td>帖标题：</td>
				<td>
					<s:hidden name="mainTie.tUser.userid"></s:hidden>
					<s:hidden name="mainTie.mid"></s:hidden>
					<s:textfield name="mainTie.mtitle"></s:textfield>
				</td>
			</tr>
			<tr>
				<td>帖内容：</td>
				<td>
					<s:textfield name="mainTie.mcontent"></s:textfield>
				</td>
			</tr>
			<tr>
				<td>发帖人：</td>
				<td>
					<s:textfield name="mainTie.TUser.userName" readonly="true"></s:textfield>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<a href="${pageContext.request.contextPath}/maintie_list.do">返回</a>
				</td>
			</tr>
		</table>
		
		<table border="1">
			<tr>
				<td>回帖编号</td>
				<td>主帖编号</td>
				<td>回帖内容</td>
				<td>回帖时间</td>
				<td>回帖人</td>
				<td>操作</td>
			</tr>
			<s:iterator value="mainTie.huiTies" status="y">
				<tr>
					<td><s:property value="hid"></s:property></td>
					<td><s:property value="mainTie.mid"></s:property></td>
					<td><s:property value="hcontent"></s:property></td>
					<td><s:date name="hdate" format="yyyy-MM-dd" /></td>
					<td><s:property value="TUser.userName"></s:property></td>
					<td>
						<a href="${pageContext.request.contextPath}/huitie_update.do?huiTie.mainTie.mid=<s:property value="mainTie.mid"/>&huiTie.hid=<s:property value="hid"/>">修改</a>&nbsp;
						<a href="${pageContext.request.contextPath}/huitie_delete.do?huiTie.mainTie.mid=<s:property value="mainTie.mid"/>&huiTie.hid=<s:property value="hid"/>">删除</a>&nbsp;
						<a href="${pageContext.request.contextPath}/huitie_view.do?huiTie.mainTie.mid=<s:property value="mainTie.mid"/>&huiTie.hid=<s:property value="hid"/>">查看</a>
					</td>
				</tr>
			</s:iterator>
		</table>
		<s:actionerror/>
	</s:form>
</body>
</html>
